package com.work.abstractFactory;

import com.work.abstractFactory.AirConditioner;
import com.work.abstractFactory.Tv;
import com.work.abstractFactory.ApplianceFactory;
import com.work.abstractFactory.HaiErFactory;
import com.work.abstractFactory.TCLFactory;

/**
 * @author zsj
 * @date 2023/10/10 21:26
 */
public class Test {
    public static void main(String[] args) {
        ApplianceFactory haiErFactory = new HaiErFactory();
        AirConditioner haiErAirConditioner = haiErFactory.createAirConditioner();
        haiErAirConditioner.cool();
        Tv haiErTv = haiErFactory.createTv();
        haiErTv.play();


        ApplianceFactory tclFactory = new TCLFactory();
        AirConditioner tclAirConditioner = tclFactory.createAirConditioner();
        tclAirConditioner.cool();
        Tv tclTv = tclFactory.createTv();
        tclTv.play();
    }
}
